package com.wzh.house.service.impl;

import com.wzh.house.entity.NewImgEntity;
import org.springframework.stereotype.Service;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.wzh.common.utils.PageUtils;
import com.wzh.common.utils.Query;

import com.wzh.house.dao.HouseAttrKeyDao;
import com.wzh.house.entity.HouseAttrKeyEntity;
import com.wzh.house.service.HouseAttrKeyService;


@Service("houseAttrKeyService")
public class HouseAttrKeyServiceImpl extends ServiceImpl<HouseAttrKeyDao, HouseAttrKeyEntity> implements HouseAttrKeyService {

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        IPage<HouseAttrKeyEntity> page = this.page(
                new Query<HouseAttrKeyEntity>().getPage(params),
                new QueryWrapper<HouseAttrKeyEntity>()
        );

        return new PageUtils(page);
    }
    @Override
    public HouseAttrKeyEntity getOneByTypeId(Integer typeId) {
        return baseMapper.selectOne(new QueryWrapper<HouseAttrKeyEntity>().eq("house_type_id",typeId));
    }
}